<?php
/*
Engineer: Sean Margison
Updated: 12/2/2011
Description: Shows details of selected intern position

*/


 ?>

<?php 
	$apps = null;
	$pos = null;
	if($this->position){
		$pos = $this->position;
	}
	if($this->applications){
		$apps = $this->applications;
	}
?>
<?php if($pos && $apps): ?>
<h3>Applicants</h3>
<table>
    <tr>
        <th>Name</th>
        <th>Accepted</th>
    </tr>
	<?php foreach($apps as $app): ?>
    <tr>
        <td><a href="
		<?php echo $this->url(array('controller'=>'internship','action'=>'application','application'=>$pos['APPID'])); ?>
		"><?php echo $app['FIRSTNAME']. " " . $app['MIDDLENAME'] . " " . $app['LASTNAME'] ?></a></td>
        <td><?php echo $app[''] ?></td> 	
    </tr>
	<?php endforeach; ?>
</table>
<?php endif; ?>
<?php if(!$apps): ?>
	<h3>There are currently no applicants for this positions.</h3>
<?php endif; ?>
<?php if($pos):?>
<h3>Position details</h3>
	<dl>
  	  <dt>Position title</dt>
		<dd><?php echo $pos['NAME'] ?></dd>
	  <dt>Requested for term</dt>
		<dd><?php echo $pos['TERM'] ?></dd>
	  <dt>Positions</dt>
		<dd>Requested: <?php echo $pos['POSITIONSREQUESTED'] ?></dd>
		<dd>Possible: <?php echo $pos['POSITIONSGRANTED'] ?></dd>
	  <dt>Start and end dates</dt>
		<dd>Start:&nbsp;<?php echo $pos['STARTDATE'] ?></dd>
		<dd>End:&nbsp;<?php echo $pos['ENDDATE'] ?></dd>
<!--	  <dt>Description</dt>
		<dd><?php echo $pos['DESCRIPTION'] ?></dd>-->
	  <dt>Responsibilities</dt>
		<dd><?php echo $pos['RESPONSIBILITIES'] ?></dd>
	  <dt>Educational goals</dt>
		<dd><?php echo $pos['EDUCATIONALGOALS'] ?></dd>
	  <dt>Skills and qualifications</dt>
		<dd>
			<ul>
				<?php 
					$skills = explode(" | ",$pos['SKILLSQUALIFICATIONS']);
					foreach($skills as $s){
						if(trim($s) != ''){
						echo "<li>".trim($s)."<li>";
						}
					}
				?>
			</ul>
		</dd>
	  <dt>Required/Preferred majors or academic programs</dt>
		<dd><?php echo $pos['PROGRAMS'] ?></dd>
	  <dt>Importance of majors</dt>
		<dd><?php echo $pos['MAJORIMPORTANCE'] ?></dd>
	  <dt>Supervisor name</dt>
		<dd><?php echo $pos['SUPERVISOR'] ?></dd>
	  <dt>Is this person different from the agency contact?</dt>
		<dd>
			<?php 
				if($pos['SUPERISCONTACT']=='y'){
					echo "Yes";
				}else{
					echo "No";
				}
			?>
		</dd>
	  <dt>Mentor/Supervision Structure</dt>
		<dd><?php echo $pos['STRUCTURE'] ?></dd>
	  <dt>Support from APPLES</dt>
		<dd><?php echo $pos['SUPPORT'] ?></dd>
	  <dt>Number of staff that support your work</dt>
		<dd><?php echo $pos['STAFF'] ?></dd>
	  <dt>Do you have other student interns?</dt>
		<dd>
			<?php 
				if($pos['OTHERINTERNS']=='y'){
					echo "Yes";
				}else{
					echo "No";
				}
			?>
		</dd>
	  <dt>Describe in terms of hours worked, number of students, and work accomplished</dt>
		<dd><?php echo $pos['DESCRIPTION'] ?></dd>
	  <dt>Please tell us how an APPLES intern would benefit your organization</dt>
		<dd><?php echo $pos['BENEFITS'] ?></dd>	  
</dl>
<?php endif; ?>
<?php if(!$pos):?>
	<h3>The position requested does not exist or you do not have permission to view the position.</h3>
<?php endif; ?>
